/*
===========================================================================
This source file is part of DyLab (Dynamic Laboratory)
For the latest info, see http://code.google.com/p/dylab/

Copyright (c) 2006-2008 Lukas Krejci
(krejci.lukas@volny.cz)

This file is part of DyLab.

    DyLab is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DyLab is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DyLab.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================
*/

#ifndef __dylab_ComModelTechnique_h__
#define __dylab_ComModelTechnique_h__

//===========================================================================================
#include <dylab/simobject/ISimObjectComponent.h>
#include <dylab/simobject/ComModelStructure.h>
#include <dylab/utils/geometry/Vector3.h>
#include <dylab/utils/components/ComponentBase.h>

//===========================================================================================
namespace dylab {

    /** Model techniqe component type.
	@remarks
		This class defines an interface for the model technique component type.
		Components of this type are responsible for implementing the requested deformable model.
		If the integration scheme is explicit, then it will be taken care of by another componet
		of the type ComModelIntegrator.
     */
    class DYLAB_EXPORT ComModelTechnique
        : public ISimObjectComponent
        , public ComponentBase<ComModelTechnique>
    {
    public:

        ComModelTechnique(const String & _componentName);
        virtual ~ComModelTechnique();

        /** Performs the computation of the implemented model technique.
		@remarks
			The derived component should put all the computation of its deformable model into this method,
			which is called every time the corresponding simulation object is being updated
			(right before the call to the ComModelIntegrator::timeStep() method).
         */
        virtual void performComputation() = 0;
    };

}

//===========================================================================================
#endif // __dylab_ComModelTechnique_h__
